import dao.BaseDao;
import dao.PatientDao;
import dao.impl.PatientDaoImpl;
import utils.ConnectionUtil;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @projectName: Chapter8
 * @package: PACKAGE_NAME
 * @className: Test2
 * @author: 翟
 * @date: 2025/3/31 11:09
 */

public class Test2 {
    public static void main(String[] args) {
        Connection conn = null;
        try {
            conn = ConnectionUtil.getConnection();
            PatientDao patientDao = new PatientDaoImpl(conn);
            System.out.println(patientDao.getAll());
        } catch (SQLException e) {
            e.printStackTrace();
        }finally {
            ConnectionUtil.closeALL(null , null , conn);
        }
    }
}
